class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: F = None
        self.o: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: B = None
        self.x: C = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: B = None
        self.x: C = None
        self.v: B = None
        self.txt = txt

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

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

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

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