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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: A = None
        self.r: E = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: D = None
        self.s: C = None
        self.u: D = None
        self.o: F = None
        self.z: H = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: H = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.q: E = None
        self.z: A = None
        self.v: A = None
        self.s: H = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: B = None
        self.o: E = None
        self.r: B = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: A = None
        self.r: E = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: D = None
        self.s: C = None
        self.u: D = None
        self.o: F = None
        self.z: H = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: H = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.q: E = None
        self.z: A = None
        self.v: A = None
        self.s: H = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: B = None
        self.o: E = None
        self.r: B = None
        self.t: A = None
        self.txt = txt

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

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