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

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

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

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

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

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

c = A("c")
e = B("e")
b = C("b")
h = D("h")
k = E("k")
g = F("g")
d = E("d")
l = B("l")
n = F("n")
j = F("j")

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

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

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

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

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

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

c = A("c")
e = B("e")
b = C("b")
h = D("h")
k = E("k")
g = F("g")
d = E("d")
l = B("l")
n = F("n")
j = F("j")

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