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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: E = None
        self.s: H = None
        self.v: D = None
        self.t: F = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: D = None
        self.v: A = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: G = None
        self.r: F = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.q: F = None
        self.t: E = None
        self.x: E = None
        self.w: F = None
        self.y: A = None
        self.txt = txt

l = A("l")
i = B("i")
m = C("m")
n = D("n")
d = E("d")
b = F("b")
g = G("g")
c = H("c")
h = I("h")
k = B("k")

l.q = b
i.w = h
i.t = g
m.z = g
m.o = d
m.s = c
m.v = n
m.t = b
m.u = k
n.r = h
n.s = l
d.t = h
d.z = n
d.q = n
d.v = l
b.u = g
b.o = m
g.o = i
g.x = b
c.w = g
c.t = g
c.v = g
c.r = b
h.s = k
h.r = i
h.q = b
h.w = b
h.t = d
h.x = d
h.y = l
k.w = h
k.t = g
assert h.x.q.s.q.u.x.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: E = None
        self.s: H = None
        self.v: D = None
        self.t: F = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: D = None
        self.v: A = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: G = None
        self.r: F = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.q: F = None
        self.t: E = None
        self.x: E = None
        self.w: F = None
        self.y: A = None
        self.txt = txt

l = A("l")
i = B("i")
m = C("m")
n = D("n")
d = E("d")
b = F("b")
g = G("g")
c = H("c")
h = I("h")
k = B("k")

l.q = b
i.w = h
i.t = g
m.z = g
m.o = d
m.s = c
m.v = n
m.t = b
m.u = k
n.r = h
n.s = l
d.t = h
d.z = n
d.q = n
d.v = l
b.u = g
b.o = m
g.o = i
g.x = b
c.w = g
c.t = g
c.v = g
c.r = b
h.s = k
h.r = i
h.q = b
h.w = b
h.t = d
h.x = d
h.y = l
k.w = h
k.t = g
assert h.x.q.s.q.u.x.o.s.txt == "c"