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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: B = None
        self.x: A = None
        self.p: G = None
        self.q: F = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: B = None
        self.u: B = None
        self.z: C = None
        self.v: E = None
        self.r: E = None
        self.p: D = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: B = None
        self.x: A = None
        self.p: G = None
        self.q: F = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: B = None
        self.u: B = None
        self.z: C = None
        self.v: E = None
        self.r: E = None
        self.p: D = None
        self.t: D = None
        self.txt = txt

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

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