class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: F = None
        self.t: E = None
        self.z: H = None
        self.w: D = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: C = None
        self.y: D = None
        self.z: C = None
        self.v: F = None
        self.q: F = None
        self.t: D = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: I = None
        self.p: A = None
        self.z: F = None
        self.v: H = None
        self.u: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: I = None
        self.z: J = None
        self.y: J = None
        self.u: G = None
        self.p: E = None
        self.o: B = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: D = None
        self.txt = txt

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

c = A("c")
g = B("g")
a = C("a")
l = D("l")
h = E("h")
d = F("d")
k = G("k")
e = H("e")
n = I("n")
b = J("b")

c.y = d
c.v = d
c.o = d
c.t = h
c.z = e
c.w = l
g.r = e
g.w = a
g.z = a
g.u = a
g.y = l
g.t = l
g.v = d
g.q = d
a.o = d
a.u = l
a.s = l
a.r = n
l.x = n
l.s = n
l.p = c
l.z = d
l.v = e
l.u = b
h.r = l
d.x = a
d.w = k
k.t = b
k.y = b
k.o = n
k.u = d
k.p = h
k.r = h
k.z = a
k.v = l
k.s = l
k.x = c
e.r = c
e.x = c
e.s = n
e.z = b
e.y = b
e.u = k
e.p = h
e.v = h
e.o = g
n.p = b
n.q = l
b.y = n
b.x = n
b.u = k
b.z = k
b.t = d
b.p = e
b.q = c
assert k.t.u.t.u.u.w.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: F = None
        self.t: E = None
        self.z: H = None
        self.w: D = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: C = None
        self.y: D = None
        self.z: C = None
        self.v: F = None
        self.q: F = None
        self.t: D = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: I = None
        self.p: A = None
        self.z: F = None
        self.v: H = None
        self.u: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: I = None
        self.z: J = None
        self.y: J = None
        self.u: G = None
        self.p: E = None
        self.o: B = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: D = None
        self.txt = txt

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

c = A("c")
g = B("g")
a = C("a")
l = D("l")
h = E("h")
d = F("d")
k = G("k")
e = H("e")
n = I("n")
b = J("b")

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