class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: C = None
        self.u: B = None
        self.y: H = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: I = None
        self.q: C = None
        self.z: F = None
        self.x: E = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: A = None
        self.o: C = None
        self.x: I = None
        self.w: A = None
        self.u: C = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: G = None
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: F = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: G = None
        self.u: I = None
        self.z: B = None
        self.p: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: I = None
        self.q: C = None
        self.z: F = None
        self.x: E = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: A = None
        self.o: C = None
        self.x: I = None
        self.w: A = None
        self.u: C = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: G = None
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: F = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: G = None
        self.u: I = None
        self.z: B = None
        self.p: A = None
        self.txt = txt

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

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

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