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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: A = None
        self.r: G = None
        self.v: E = None
        self.s: C = None
        self.z: D = None
        self.o: B = None
        self.txt = txt

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

l = A("l")
a = B("a")
e = C("e")
n = D("n")
j = E("j")
m = F("m")
f = G("f")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: A = None
        self.r: G = None
        self.v: E = None
        self.s: C = None
        self.z: D = None
        self.o: B = None
        self.txt = txt

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

l = A("l")
a = B("a")
e = C("e")
n = D("n")
j = E("j")
m = F("m")
f = G("f")

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