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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: F = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: C = None
        self.o: B = None
        self.txt = txt

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

l.p = k
l.y = k
e.p = a
a.r = e
a.u = l
k.q = f
k.r = i
k.o = e
c.z = l
i.u = j
i.z = a
i.v = f
i.p = k
j.v = k
j.q = a
j.o = e
f.u = j
f.z = a
f.v = i
f.p = k
d.z = l
assert c.z.p.r.v.p.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: F = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: C = None
        self.o: B = None
        self.txt = txt

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

l.p = k
l.y = k
e.p = a
a.r = e
a.u = l
k.q = f
k.r = i
k.o = e
c.z = l
i.u = j
i.z = a
i.v = f
i.p = k
j.v = k
j.q = a
j.o = e
f.u = j
f.z = a
f.v = i
f.p = k
d.z = l
assert c.z.p.r.v.p.txt == "k"