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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

i.q = l
i.s = l
i.p = k
i.r = b
i.x = j
i.v = j
h.x = e
h.z = l
c.u = l
c.p = i
g.v = l
g.y = b
g.z = i
l.x = h
b.s = c
j.v = l
j.y = e
j.z = i
a.x = b
a.z = l
e.s = c
k.x = b
k.z = l
assert b.s.p.r.s.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: B = None
        self.r: F = None
        self.s: E = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

i.q = l
i.s = l
i.p = k
i.r = b
i.x = j
i.v = j
h.x = e
h.z = l
c.u = l
c.p = i
g.v = l
g.y = b
g.z = i
l.x = h
b.s = c
j.v = l
j.y = e
j.z = i
a.x = b
a.z = l
e.s = c
k.x = b
k.z = l
assert b.s.p.r.s.u.x.txt == "h"