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

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

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

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

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

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

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

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

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

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

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

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

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

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

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