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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: E = None
        self.p: D = None
        self.q: E = None
        self.u: E = None
        self.txt = txt

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

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

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

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

l = A("l")
d = B("d")
j = C("j")
b = D("b")
g = E("g")
f = F("f")
i = C("i")

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: E = None
        self.p: D = None
        self.q: E = None
        self.u: E = None
        self.txt = txt

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

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

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

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

l = A("l")
d = B("d")
j = C("j")
b = D("b")
g = E("g")
f = F("f")
i = C("i")

l.v = b
l.q = b
l.p = d
d.z = g
d.w = g
d.q = g
d.u = g
d.p = b
j.w = f
j.v = b
j.t = b
j.r = b
j.p = l
b.p = f
b.o = f
b.x = d
b.v = d
b.r = l
g.o = f
g.q = b
g.u = b
g.x = b
g.p = j
g.w = d
f.z = b
f.x = l
f.q = l
i.w = f
i.v = b
i.t = b
i.r = b
i.p = l
assert d.p.r.p.u.x.txt == "b"