class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: C = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: I = None
        self.v: A = None
        self.u: H = None
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: G = None
        self.x: G = None
        self.z: A = None
        self.o: I = None
        self.w: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: D = None
        self.z: A = None
        self.r: I = None
        self.y: I = None
        self.w: A = None
        self.t: G = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: C = None
        self.r: G = None
        self.z: A = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: I = None
        self.v: A = None
        self.u: H = None
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: G = None
        self.x: G = None
        self.z: A = None
        self.o: I = None
        self.w: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: D = None
        self.z: A = None
        self.r: I = None
        self.y: I = None
        self.w: A = None
        self.t: G = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: C = None
        self.r: G = None
        self.z: A = None
        self.v: F = None
        self.txt = txt

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

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