class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: F = None
        self.r: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: C = None
        self.y: C = None
        self.r: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: C = None
        self.y: C = None
        self.r: D = None
        self.q: D = None
        self.txt = txt

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

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

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