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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: A = None
        self.x: D = None
        self.w: G = None
        self.y: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: D = None
        self.p: H = None
        self.x: F = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: A = None
        self.x: D = None
        self.w: G = None
        self.y: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: D = None
        self.p: H = None
        self.x: F = None
        self.r: B = None
        self.txt = txt

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

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