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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

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

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

j.u = k
j.q = k
j.t = n
f.v = n
h.p = l
h.x = l
h.o = j
h.q = j
h.v = n
k.t = j
k.o = j
k.v = f
k.z = l
k.r = h
l.q = n
n.p = k
assert l.q.p.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: D = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

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

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

j.u = k
j.q = k
j.t = n
f.v = n
h.p = l
h.x = l
h.o = j
h.q = j
h.v = n
k.t = j
k.o = j
k.v = f
k.z = l
k.r = h
l.q = n
n.p = k
assert l.q.p.o.t.txt == "n"