class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: I = None
        self.w: H = None
        self.u: B = None
        self.t: I = None
        self.x: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: I = None
        self.u: J = None
        self.p: C = None
        self.t: A = None
        self.z: D = None
        self.r: C = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: C = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: I = None
        self.t: H = None
        self.w: C = None
        self.u: J = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: J = None
        self.y: H = None
        self.o: F = None
        self.r: C = None
        self.u: A = None
        self.t: F = None
        self.q: E = None
        self.x: J = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: J = None
        self.s: E = None
        self.r: D = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: F = None
        self.q: I = None
        self.y: H = None
        self.t: H = None
        self.z: D = None
        self.w: I = None
        self.r: A = None
        self.u: G = None
        self.v: B = None
        self.txt = txt

k = A("k")
j = B("j")
l = C("l")
b = D("b")
f = E("f")
c = F("c")
e = G("e")
g = H("g")
m = I("m")
d = J("d")

k.r = l
k.q = m
k.t = m
k.w = g
k.u = j
k.x = d
j.v = d
j.u = d
j.s = m
j.q = m
j.p = l
j.r = l
j.t = k
j.z = b
l.s = j
l.p = c
b.r = j
f.s = g
f.p = l
f.w = b
c.v = d
c.u = d
c.o = m
c.t = g
c.w = l
c.r = e
e.z = l
e.r = l
e.v = d
e.x = d
e.y = g
e.o = c
e.t = c
e.u = k
e.q = f
e.s = b
g.u = f
g.s = f
g.p = f
g.w = d
g.r = b
g.x = l
m.s = b
d.x = e
d.u = e
d.p = c
d.q = m
d.w = m
d.y = g
d.t = g
d.z = b
d.r = k
d.v = j
assert f.w.r.q.s.r.t.x.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: I = None
        self.w: H = None
        self.u: B = None
        self.t: I = None
        self.x: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: I = None
        self.u: J = None
        self.p: C = None
        self.t: A = None
        self.z: D = None
        self.r: C = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: C = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: I = None
        self.t: H = None
        self.w: C = None
        self.u: J = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: J = None
        self.y: H = None
        self.o: F = None
        self.r: C = None
        self.u: A = None
        self.t: F = None
        self.q: E = None
        self.x: J = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: J = None
        self.s: E = None
        self.r: D = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: F = None
        self.q: I = None
        self.y: H = None
        self.t: H = None
        self.z: D = None
        self.w: I = None
        self.r: A = None
        self.u: G = None
        self.v: B = None
        self.txt = txt

k = A("k")
j = B("j")
l = C("l")
b = D("b")
f = E("f")
c = F("c")
e = G("e")
g = H("g")
m = I("m")
d = J("d")

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