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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: D = None
        self.w: B = None
        self.r: F = None
        self.o: D = None
        self.v: F = None
        self.txt = txt

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

d = A("d")
j = B("j")
l = C("l")
i = D("i")
n = E("n")
b = F("b")
m = C("m")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: D = None
        self.w: B = None
        self.r: F = None
        self.o: D = None
        self.v: F = None
        self.txt = txt

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

d = A("d")
j = B("j")
l = C("l")
i = D("i")
n = E("n")
b = F("b")
m = C("m")

d.x = i
d.z = i
d.u = l
d.s = m
d.v = j
j.y = i
l.y = i
l.v = m
l.s = b
i.p = l
n.t = b
n.r = b
n.v = b
n.x = i
n.o = i
n.w = j
b.y = l
b.u = d
b.p = d
b.s = j
b.w = n
m.y = i
m.v = l
m.s = b
assert b.s.y.p.y.p.v.y.txt == "i"