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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: B = None
        self.v: F = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: E = None
        self.z: A = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: B = None
        self.v: F = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: E = None
        self.z: A = None
        self.u: C = None
        self.txt = txt

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

b.x = f
b.o = i
b.w = i
b.p = l
b.v = l
b.q = j
c.z = b
e.t = j
j.v = i
l.s = j
l.u = j
l.o = c
l.v = i
i.y = e
i.u = e
i.p = l
i.z = f
f.x = b
f.o = i
f.w = i
f.p = l
f.v = l
f.q = j
assert j.v.z.p.txt == "l"