class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: F = None
        self.o: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

j = A("j")
e = B("e")
n = C("n")
g = D("g")
f = E("f")
h = F("h")
l = F("l")

j.q = e
j.t = h
j.o = f
j.z = f
e.t = f
e.x = g
e.v = n
e.z = j
n.t = l
g.y = f
f.y = e
f.u = g
f.t = g
f.x = l
f.o = l
f.z = n
h.u = g
h.t = e
h.o = e
h.y = e
h.p = j
h.q = l
l.u = g
l.t = e
l.o = e
l.y = e
l.p = j
l.q = h
assert l.u.y.t.y.z.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: F = None
        self.o: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

j = A("j")
e = B("e")
n = C("n")
g = D("g")
f = E("f")
h = F("h")
l = F("l")

j.q = e
j.t = h
j.o = f
j.z = f
e.t = f
e.x = g
e.v = n
e.z = j
n.t = l
g.y = f
f.y = e
f.u = g
f.t = g
f.x = l
f.o = l
f.z = n
h.u = g
h.t = e
h.o = e
h.y = e
h.p = j
h.q = l
l.u = g
l.t = e
l.o = e
l.y = e
l.p = j
l.q = h
assert l.u.y.t.y.z.txt == "n"