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

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

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

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

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

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

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

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

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

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

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

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

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

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

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