class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: C = None
        self.z: E = None
        self.s: B = None
        self.q: C = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: D = None
        self.q: A = None
        self.p: D = None
        self.x: F = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: C = None
        self.w: D = None
        self.u: E = None
        self.x: B = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: D = None
        self.s: F = None
        self.o: B = None
        self.x: F = None
        self.v: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: E = None
        self.x: A = None
        self.q: B = None
        self.w: A = None
        self.r: D = None
        self.txt = txt

e = A("e")
h = B("h")
k = C("k")
a = D("a")
j = E("j")
n = F("n")
f = E("f")
c = E("c")
g = D("g")

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: D = None
        self.q: A = None
        self.p: D = None
        self.x: F = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: C = None
        self.w: D = None
        self.u: E = None
        self.x: B = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: D = None
        self.s: F = None
        self.o: B = None
        self.x: F = None
        self.v: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: E = None
        self.x: A = None
        self.q: B = None
        self.w: A = None
        self.r: D = None
        self.txt = txt

e = A("e")
h = B("h")
k = C("k")
a = D("a")
j = E("j")
n = F("n")
f = E("f")
c = E("c")
g = D("g")

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