class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: E = None
        self.w: H = None
        self.y: D = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: H = None
        self.z: F = None
        self.x: C = None
        self.w: F = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: B = None
        self.w: G = None
        self.x: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: C = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: C = None
        self.y: D = None
        self.z: A = None
        self.p: C = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: H = None
        self.z: F = None
        self.x: C = None
        self.w: F = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: B = None
        self.w: G = None
        self.x: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: C = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: C = None
        self.y: D = None
        self.z: A = None
        self.p: C = None
        self.w: D = None
        self.txt = txt

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

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