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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: E = None
        self.v: A = None
        self.x: A = None
        self.y: E = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: E = None
        self.v: A = None
        self.x: A = None
        self.y: E = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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