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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: D = None
        self.s: D = None
        self.v: A = None
        self.o: A = None
        self.y: E = None
        self.txt = txt

n = A("n")
c = B("c")
g = C("g")
e = D("e")
k = E("k")
a = F("a")
b = D("b")
h = D("h")

n.t = g
n.o = g
n.v = b
c.z = a
g.w = k
g.q = a
g.x = n
g.o = c
e.q = k
e.o = g
e.r = n
e.y = c
e.v = c
k.z = n
k.o = n
k.y = a
k.s = a
k.u = c
a.z = k
a.y = k
a.u = h
a.s = h
a.v = n
a.o = n
b.q = k
b.o = g
b.r = n
b.y = c
b.v = c
h.q = k
h.o = g
h.r = n
h.y = c
h.v = c
assert a.y.o.v.q.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: C = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: D = None
        self.s: D = None
        self.v: A = None
        self.o: A = None
        self.y: E = None
        self.txt = txt

n = A("n")
c = B("c")
g = C("g")
e = D("e")
k = E("k")
a = F("a")
b = D("b")
h = D("h")

n.t = g
n.o = g
n.v = b
c.z = a
g.w = k
g.q = a
g.x = n
g.o = c
e.q = k
e.o = g
e.r = n
e.y = c
e.v = c
k.z = n
k.o = n
k.y = a
k.s = a
k.u = c
a.z = k
a.y = k
a.u = h
a.s = h
a.v = n
a.o = n
b.q = k
b.o = g
b.r = n
b.y = c
b.v = c
h.q = k
h.o = g
h.r = n
h.y = c
h.v = c
assert a.y.o.v.q.txt == "k"