class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: A = None
        self.y: A = None
        self.r: C = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: A = None
        self.y: A = None
        self.r: C = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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