class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.z: F = None
        self.q: C = None
        self.t: A = None
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.x: A = None
        self.z: D = None
        self.txt = txt

e = A("e")
h = B("h")
d = C("d")
a = D("a")
f = E("f")
c = F("c")
l = F("l")
n = F("n")
b = A("b")

e.v = f
e.w = f
e.u = a
e.z = l
e.q = d
e.t = b
h.t = b
d.z = b
d.x = c
a.q = d
f.u = n
f.y = h
f.p = d
c.y = n
c.q = d
c.x = e
c.z = a
l.y = c
l.q = d
l.x = b
l.z = a
n.y = l
n.q = d
n.x = b
n.z = a
b.v = f
b.w = f
b.u = a
b.z = l
b.q = d
b.t = e
assert b.u.q.z.z.z.q.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.z: F = None
        self.q: C = None
        self.t: A = None
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.x: A = None
        self.z: D = None
        self.txt = txt

e = A("e")
h = B("h")
d = C("d")
a = D("a")
f = E("f")
c = F("c")
l = F("l")
n = F("n")
b = A("b")

e.v = f
e.w = f
e.u = a
e.z = l
e.q = d
e.t = b
h.t = b
d.z = b
d.x = c
a.q = d
f.u = n
f.y = h
f.p = d
c.y = n
c.q = d
c.x = e
c.z = a
l.y = c
l.q = d
l.x = b
l.z = a
n.y = l
n.q = d
n.x = b
n.z = a
b.v = f
b.w = f
b.u = a
b.z = l
b.q = d
b.t = e
assert b.u.q.z.z.z.q.z.z.txt == "l"