class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: E = None
        self.z: D = None
        self.x: F = None
        self.w: B = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: E = None
        self.z: D = None
        self.x: F = None
        self.w: B = None
        self.p: A = None
        self.txt = txt

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

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

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

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