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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.w: C = None
        self.o: F = None
        self.r: E = None
        self.t: A = None
        self.txt = txt

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

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

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

i = A("i")
d = B("d")
k = C("k")
c = D("c")
n = E("n")
a = F("a")
f = A("f")
h = D("h")
j = C("j")

i.q = h
i.s = k
i.t = c
i.x = f
d.q = n
k.u = d
k.x = f
k.t = f
k.w = j
k.o = a
k.r = n
c.y = j
c.p = n
n.u = a
n.z = j
n.v = c
a.w = d
a.z = d
a.s = d
f.q = h
f.s = k
f.t = c
f.x = i
h.y = j
h.p = n
j.u = d
j.x = i
j.t = i
j.w = k
j.o = a
j.r = n
assert a.z.q.v.p.z.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: C = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.w: C = None
        self.o: F = None
        self.r: E = None
        self.t: A = None
        self.txt = txt

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

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

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

i = A("i")
d = B("d")
k = C("k")
c = D("c")
n = E("n")
a = F("a")
f = A("f")
h = D("h")
j = C("j")

i.q = h
i.s = k
i.t = c
i.x = f
d.q = n
k.u = d
k.x = f
k.t = f
k.w = j
k.o = a
k.r = n
c.y = j
c.p = n
n.u = a
n.z = j
n.v = c
a.w = d
a.z = d
a.s = d
f.q = h
f.s = k
f.t = c
f.x = i
h.y = j
h.p = n
j.u = d
j.x = i
j.t = i
j.w = k
j.o = a
j.r = n
assert a.z.q.v.p.z.txt == "j"