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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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

a.v = f
a.z = f
a.x = f
a.q = d
a.u = j
a.s = l
f.q = n
f.u = n
n.t = j
n.u = m
n.q = m
j.o = d
j.z = m
d.v = m
d.y = j
m.s = j
m.o = j
c.v = l
c.x = l
c.s = l
c.q = d
c.z = f
c.u = j
l.q = n
l.u = n
assert c.q.y.z.s.z.o.o.txt == "d"