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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: D = None
        self.u: B = None
        self.o: C = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

c.x = l
c.o = n
c.r = a
a.z = c
a.q = e
a.u = j
a.o = h
a.p = b
n.u = l
n.z = l
n.w = k
n.t = j
n.o = a
i.u = j
k.r = e
l.v = e
l.t = a
l.r = a
l.s = c
l.x = j
e.u = a
b.x = l
b.o = n
b.r = j
j.z = b
j.q = i
j.u = a
j.o = h
j.p = c
h.u = l
h.z = l
h.w = k
h.t = j
h.o = a
assert h.t.p.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: C = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: D = None
        self.u: B = None
        self.o: C = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

c.x = l
c.o = n
c.r = a
a.z = c
a.q = e
a.u = j
a.o = h
a.p = b
n.u = l
n.z = l
n.w = k
n.t = j
n.o = a
i.u = j
k.r = e
l.v = e
l.t = a
l.r = a
l.s = c
l.x = j
e.u = a
b.x = l
b.o = n
b.r = j
j.z = b
j.q = i
j.u = a
j.o = h
j.p = c
h.u = l
h.z = l
h.w = k
h.t = j
h.o = a
assert h.t.p.r.txt == "a"