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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: F = None
        self.z: B = None
        self.t: C = None
        self.q: E = None
        self.o: E = None
        self.u: C = None
        self.w: A = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: C = None
        self.p: B = None
        self.r: I = None
        self.x: B = None
        self.s: B = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: F = None
        self.z: B = None
        self.t: C = None
        self.q: E = None
        self.o: E = None
        self.u: C = None
        self.w: A = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: C = None
        self.p: B = None
        self.r: I = None
        self.x: B = None
        self.s: B = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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