class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: C = None
        self.v: I = None
        self.o: C = None
        self.w: C = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: A = None
        self.y: G = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: D = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: D = None
        self.o: D = None
        self.w: C = None
        self.q: C = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: H = None
        self.txt = txt

c = A("c")
f = B("f")
j = C("j")
e = D("e")
n = E("n")
a = F("a")
l = G("l")
m = H("m")
k = I("k")

c.q = m
f.r = j
f.q = j
f.o = j
f.w = j
f.v = k
f.u = k
j.q = c
j.r = l
e.s = a
e.o = f
n.o = a
n.v = e
a.w = e
a.q = c
a.s = c
a.y = l
l.s = m
l.z = e
l.o = e
m.t = k
m.y = e
m.o = e
m.w = j
m.q = j
m.x = c
k.x = c
k.t = m
assert c.q.x.q.x.q.o.o.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: C = None
        self.v: I = None
        self.o: C = None
        self.w: C = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: A = None
        self.y: G = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: D = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: D = None
        self.o: D = None
        self.w: C = None
        self.q: C = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: H = None
        self.txt = txt

c = A("c")
f = B("f")
j = C("j")
e = D("e")
n = E("n")
a = F("a")
l = G("l")
m = H("m")
k = I("k")

c.q = m
f.r = j
f.q = j
f.o = j
f.w = j
f.v = k
f.u = k
j.q = c
j.r = l
e.s = a
e.o = f
n.o = a
n.v = e
a.w = e
a.q = c
a.s = c
a.y = l
l.s = m
l.z = e
l.o = e
m.t = k
m.y = e
m.o = e
m.w = j
m.q = j
m.x = c
k.x = c
k.t = m
assert c.q.x.q.x.q.o.o.v.txt == "k"