class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: B = None
        self.w: A = None
        self.y: B = None
        self.z: E = None
        self.t: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

j = A("j")
f = B("f")
k = C("k")
a = D("a")
n = E("n")
d = F("d")
m = A("m")

j.o = f
j.p = f
j.y = f
j.w = m
j.z = n
j.t = a
f.w = k
f.u = k
f.q = d
k.v = j
a.z = d
a.u = d
a.t = f
n.u = f
n.z = m
d.v = f
m.o = f
m.p = f
m.y = f
m.w = j
m.z = n
m.t = a
assert a.z.v.q.v.q.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: B = None
        self.w: A = None
        self.y: B = None
        self.z: E = None
        self.t: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

j = A("j")
f = B("f")
k = C("k")
a = D("a")
n = E("n")
d = F("d")
m = A("m")

j.o = f
j.p = f
j.y = f
j.w = m
j.z = n
j.t = a
f.w = k
f.u = k
f.q = d
k.v = j
a.z = d
a.u = d
a.t = f
n.u = f
n.z = m
d.v = f
m.o = f
m.p = f
m.y = f
m.w = j
m.z = n
m.t = a
assert a.z.v.q.v.q.txt == "d"