class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: E = None
        self.u: B = None
        self.y: B = None
        self.p: F = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.s: A = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: F = None
        self.x: D = None
        self.s: F = None
        self.z: A = None
        self.u: D = None
        self.txt = txt

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

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

l = A("l")
h = B("h")
a = C("a")
e = D("e")
k = E("k")
f = F("f")
m = E("m")
b = A("b")
n = B("n")
g = D("g")

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.s: A = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: F = None
        self.x: D = None
        self.s: F = None
        self.z: A = None
        self.u: D = None
        self.txt = txt

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

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

l = A("l")
h = B("h")
a = C("a")
e = D("e")
k = E("k")
f = F("f")
m = E("m")
b = A("b")
n = B("n")
g = D("g")

l.r = n
l.y = n
l.t = k
l.u = h
l.p = f
l.o = m
h.o = g
h.z = f
h.s = l
h.y = l
a.y = f
a.u = m
e.y = h
e.t = f
e.s = f
e.x = g
e.u = g
e.z = b
k.x = e
k.u = m
k.v = m
k.s = b
k.o = h
k.r = l
f.s = e
m.x = e
m.u = k
m.v = k
m.s = l
m.o = h
m.r = b
b.r = n
b.u = n
b.y = n
b.t = m
b.p = f
b.o = k
n.o = e
n.z = f
n.s = l
n.y = b
g.y = h
g.t = f
g.s = f
g.x = e
g.u = e
g.z = b
assert g.x.x.s.s.u.u.y.txt == "h"