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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: E = None
        self.txt = txt

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

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

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

b.t = l
b.p = j
b.s = i
b.x = m
e.p = l
j.u = c
j.t = l
j.z = l
j.w = g
j.v = g
j.p = i
i.w = l
i.s = l
l.u = e
m.t = b
m.x = h
m.u = h
m.p = l
m.s = l
m.y = j
h.t = l
h.p = j
h.s = d
h.x = m
c.t = b
c.x = b
c.u = b
c.p = l
c.s = l
c.y = g
g.u = c
g.t = l
g.z = l
g.w = j
g.v = j
g.p = i
d.w = l
d.s = l
assert l.u.p.u.p.u.p.u.p.u.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: C = None
        self.s: D = None
        self.x: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: E = None
        self.txt = txt

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

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

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

b.t = l
b.p = j
b.s = i
b.x = m
e.p = l
j.u = c
j.t = l
j.z = l
j.w = g
j.v = g
j.p = i
i.w = l
i.s = l
l.u = e
m.t = b
m.x = h
m.u = h
m.p = l
m.s = l
m.y = j
h.t = l
h.p = j
h.s = d
h.x = m
c.t = b
c.x = b
c.u = b
c.p = l
c.s = l
c.y = g
g.u = c
g.t = l
g.z = l
g.w = j
g.v = j
g.p = i
d.w = l
d.s = l
assert l.u.p.u.p.u.p.u.p.u.p.txt == "l"