class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: E = None
        self.y: I = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: I = None
        self.v: F = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: D = None
        self.y: E = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: I = None
        self.v: F = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: D = None
        self.y: E = None
        self.v: E = None
        self.txt = txt

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

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

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

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

a.x = c
a.o = d
a.y = b
a.z = b
e.v = c
e.o = i
i.r = e
m.r = c
d.y = b
d.x = b
d.v = j
d.q = m
j.r = i
j.p = m
j.y = d
j.v = d
l.u = d
c.s = l
c.y = i
c.p = i
c.z = j
c.u = j
c.v = d
c.o = e
b.x = a
b.r = l
b.z = e
assert d.x.r.u.x.z.v.v.x.x.txt == "a"