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

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

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

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

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

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

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

a.r = g
a.q = g
a.x = g
a.w = c
a.y = l
l.o = d
j.z = c
j.x = g
j.t = g
j.r = k
j.y = a
g.z = a
g.y = a
g.x = a
g.q = d
g.s = b
g.w = k
b.y = g
b.v = j
b.z = j
b.t = l
b.r = c
c.q = l
c.z = j
d.r = g
d.q = g
d.x = g
d.w = c
d.y = l
k.y = g
k.v = j
k.z = j
k.t = l
k.r = c
assert k.v.r.y.z.w.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.w: F = None
        self.x: D = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

a.r = g
a.q = g
a.x = g
a.w = c
a.y = l
l.o = d
j.z = c
j.x = g
j.t = g
j.r = k
j.y = a
g.z = a
g.y = a
g.x = a
g.q = d
g.s = b
g.w = k
b.y = g
b.v = j
b.z = j
b.t = l
b.r = c
c.q = l
c.z = j
d.r = g
d.q = g
d.x = g
d.w = c
d.y = l
k.y = g
k.v = j
k.z = j
k.t = l
k.r = c
assert k.v.r.y.z.w.txt == "c"