class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: D = None
        self.s: H = None
        self.q: G = None
        self.v: D = None
        self.u: D = None
        self.o: G = None
        self.y: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: C = None
        self.v: H = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: D = None
        self.p: E = None
        self.x: H = None
        self.q: D = None
        self.t: B = None
        self.s: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: G = None
        self.z: D = None
        self.o: C = None
        self.q: A = None
        self.x: B = None
        self.r: C = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: C = None
        self.v: H = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: D = None
        self.p: E = None
        self.x: H = None
        self.q: D = None
        self.t: B = None
        self.s: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: G = None
        self.z: D = None
        self.o: C = None
        self.q: A = None
        self.x: B = None
        self.r: C = None
        self.v: H = None
        self.txt = txt

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

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