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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: F = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: F = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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