class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: G = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: C = None
        self.v: C = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: J = None
        self.o: J = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: J = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: G = None
        self.v: C = None
        self.w: H = None
        self.y: D = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: A = None
        self.txt = txt

i = A("i")
k = B("k")
g = C("g")
e = D("e")
j = E("j")
d = F("d")
h = G("h")
a = H("a")
m = I("m")
c = J("c")

i.w = g
i.s = h
i.u = k
k.x = g
k.r = g
k.v = g
k.s = a
g.v = h
g.y = d
e.s = g
e.u = c
e.o = c
e.r = k
j.r = d
j.t = g
d.t = e
d.u = c
d.z = a
h.q = m
h.t = j
a.p = m
m.s = c
m.u = h
m.v = g
m.r = g
m.w = a
m.y = e
c.r = j
c.q = i
assert d.t.o.r.t.y.t.r.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: G = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: C = None
        self.v: C = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: J = None
        self.o: J = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: J = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: G = None
        self.v: C = None
        self.w: H = None
        self.y: D = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: A = None
        self.txt = txt

i = A("i")
k = B("k")
g = C("g")
e = D("e")
j = E("j")
d = F("d")
h = G("h")
a = H("a")
m = I("m")
c = J("c")

i.w = g
i.s = h
i.u = k
k.x = g
k.r = g
k.v = g
k.s = a
g.v = h
g.y = d
e.s = g
e.u = c
e.o = c
e.r = k
j.r = d
j.t = g
d.t = e
d.u = c
d.z = a
h.q = m
h.t = j
a.p = m
m.s = c
m.u = h
m.v = g
m.r = g
m.w = a
m.y = e
c.r = j
c.q = i
assert d.t.o.r.t.y.t.r.txt == "k"