class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: E = None
        self.z: C = None
        self.w: H = None
        self.t: C = None
        self.s: F = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: I = None
        self.y: G = None
        self.o: H = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: C = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: E = None
        self.u: D = None
        self.w: H = None
        self.t: D = None
        self.r: E = None
        self.o: E = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: E = None
        self.z: C = None
        self.w: H = None
        self.t: C = None
        self.s: F = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: I = None
        self.y: G = None
        self.o: H = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: C = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: E = None
        self.u: D = None
        self.w: H = None
        self.t: D = None
        self.r: E = None
        self.o: E = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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