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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: I = None
        self.o: D = None
        self.x: D = None
        self.q: D = None
        self.y: I = None
        self.t: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: E = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: H = None
        self.o: I = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: I = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

c = A("c")
a = B("a")
d = C("d")
g = D("g")
i = E("i")
l = F("l")
e = G("e")
j = H("j")
k = I("k")

c.q = e
c.r = k
c.o = j
a.q = j
d.z = i
d.p = k
d.y = k
d.t = k
d.o = g
d.x = g
d.q = g
g.w = e
g.q = l
i.u = d
l.v = k
l.u = k
l.t = i
e.x = g
e.w = j
e.o = k
e.r = k
j.q = d
j.r = k
j.s = l
k.u = e
assert c.o.q.x.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: I = None
        self.o: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: I = None
        self.o: D = None
        self.x: D = None
        self.q: D = None
        self.y: I = None
        self.t: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: E = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: H = None
        self.o: I = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: I = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

c = A("c")
a = B("a")
d = C("d")
g = D("g")
i = E("i")
l = F("l")
e = G("e")
j = H("j")
k = I("k")

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