class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: E = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: E = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: A = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: F = None
        self.y: D = None
        self.z: E = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: E = None
        self.p: C = None
        self.u: I = None
        self.t: E = None
        self.o: E = None
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: E = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: A = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: F = None
        self.y: D = None
        self.z: E = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: E = None
        self.p: C = None
        self.u: I = None
        self.t: E = None
        self.o: E = None
        self.w: E = None
        self.txt = txt

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

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