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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: I = None
        self.v: D = None
        self.w: C = None
        self.t: I = None
        self.x: D = None
        self.q: F = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: A = None
        self.q: D = None
        self.t: H = None
        self.u: B = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: I = None
        self.v: D = None
        self.w: C = None
        self.t: I = None
        self.x: D = None
        self.q: F = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: A = None
        self.q: D = None
        self.t: H = None
        self.u: B = None
        self.p: E = None
        self.txt = txt

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

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