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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: H = None
        self.s: H = None
        self.p: G = None
        self.q: B = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: I = None
        self.q: F = None
        self.s: B = None
        self.p: F = None
        self.t: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: H = None
        self.s: H = None
        self.p: G = None
        self.q: B = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: I = None
        self.q: F = None
        self.s: B = None
        self.p: F = None
        self.t: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: G = None
        self.txt = txt

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

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