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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: D = None
        self.p: A = None
        self.s: B = None
        self.t: E = None
        self.y: D = None
        self.v: A = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: F = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: D = None
        self.o: F = None
        self.s: F = None
        self.txt = txt

k = A("k")
n = B("n")
c = C("c")
f = D("f")
l = E("l")
g = F("g")
m = G("m")
e = H("e")

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: D = None
        self.p: A = None
        self.s: B = None
        self.t: E = None
        self.y: D = None
        self.v: A = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: F = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: D = None
        self.o: F = None
        self.s: F = None
        self.txt = txt

k = A("k")
n = B("n")
c = C("c")
f = D("f")
l = E("l")
g = F("g")
m = G("m")
e = H("e")

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