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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: D = None
        self.u: G = None
        self.y: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

l = A("l")
e = B("e")
k = C("k")
c = D("c")
h = E("h")
m = F("m")
f = G("f")
d = D("d")

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: D = None
        self.u: G = None
        self.y: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

l = A("l")
e = B("e")
k = C("k")
c = D("c")
h = E("h")
m = F("m")
f = G("f")
d = D("d")

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