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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: D = None
        self.o: D = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: D = None
        self.z: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: E = None
        self.o: E = None
        self.w: E = None
        self.y: H = None
        self.q: H = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: D = None
        self.o: D = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: D = None
        self.z: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: E = None
        self.o: E = None
        self.w: E = None
        self.y: H = None
        self.q: H = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: D = None
        self.txt = txt

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

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

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