class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: E = None
        self.r: B = None
        self.u: D = None
        self.s: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: A = None
        self.u: D = None
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

l = A("l")
k = B("k")
e = C("e")
c = D("c")
f = E("f")
a = F("a")
h = D("h")
j = B("j")

l.p = h
l.z = f
l.r = k
l.s = k
l.u = c
k.s = e
e.o = l
c.s = h
c.x = a
c.r = a
c.u = l
c.y = e
f.o = c
f.u = c
f.t = l
f.x = l
f.s = l
a.z = e
h.s = c
h.x = a
h.r = a
h.u = l
h.y = e
j.s = e
assert l.p.x.z.o.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: E = None
        self.r: B = None
        self.u: D = None
        self.s: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: A = None
        self.u: D = None
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

l = A("l")
k = B("k")
e = C("e")
c = D("c")
f = E("f")
a = F("a")
h = D("h")
j = B("j")

l.p = h
l.z = f
l.r = k
l.s = k
l.u = c
k.s = e
e.o = l
c.s = h
c.x = a
c.r = a
c.u = l
c.y = e
f.o = c
f.u = c
f.t = l
f.x = l
f.s = l
a.z = e
h.s = c
h.x = a
h.r = a
h.u = l
h.y = e
j.s = e
assert l.p.x.z.o.u.r.txt == "a"