class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: E = None
        self.x: H = None
        self.o: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: B = None
        self.x: A = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: E = None
        self.x: H = None
        self.o: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: B = None
        self.x: A = None
        self.q: F = None
        self.txt = txt

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

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

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

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