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

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: C = None
        self.u: C = None
        self.w: D = None
        self.x: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: D = None
        self.w: D = None
        self.p: B = None
        self.txt = txt

l = A("l")
i = B("i")
m = C("m")
j = D("j")
b = E("b")
f = B("f")
c = C("c")
d = B("d")
g = C("g")
n = E("n")

l.w = c
i.y = d
i.r = g
i.u = g
i.w = j
i.x = c
m.y = c
j.t = d
j.s = g
j.u = g
b.t = j
b.q = j
b.w = j
b.p = i
f.y = i
f.r = g
f.x = g
f.u = m
f.w = j
c.y = g
d.y = i
d.r = g
d.u = m
d.x = m
d.w = j
g.y = c
n.t = j
n.q = j
n.w = j
n.p = d
assert b.t.t.w.s.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: C = None
        self.u: C = None
        self.w: D = None
        self.x: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: D = None
        self.w: D = None
        self.p: B = None
        self.txt = txt

l = A("l")
i = B("i")
m = C("m")
j = D("j")
b = E("b")
f = B("f")
c = C("c")
d = B("d")
g = C("g")
n = E("n")

l.w = c
i.y = d
i.r = g
i.u = g
i.w = j
i.x = c
m.y = c
j.t = d
j.s = g
j.u = g
b.t = j
b.q = j
b.w = j
b.p = i
f.y = i
f.r = g
f.x = g
f.u = m
f.w = j
c.y = g
d.y = i
d.r = g
d.u = m
d.x = m
d.w = j
g.y = c
n.t = j
n.q = j
n.w = j
n.p = d
assert b.t.t.w.s.y.y.y.txt == "c"