class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: D = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: I = None
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: F = None
        self.v: A = None
        self.w: B = None
        self.s: C = None
        self.o: B = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: E = None
        self.u: I = None
        self.v: B = None
        self.z: C = None
        self.r: E = None
        self.x: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: E = None
        self.x: D = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: I = None
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: F = None
        self.v: A = None
        self.w: B = None
        self.s: C = None
        self.o: B = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: E = None
        self.u: I = None
        self.v: B = None
        self.z: C = None
        self.r: E = None
        self.x: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: E = None
        self.x: D = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

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

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