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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: A = None
        self.x: A = None
        self.y: D = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: A = None
        self.x: A = None
        self.y: D = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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