class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: H = None
        self.r: E = None
        self.v: H = None
        self.t: D = None
        self.u: F = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: E = None
        self.r: E = None
        self.s: G = None
        self.v: C = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: H = None
        self.r: E = None
        self.v: H = None
        self.t: D = None
        self.u: F = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: E = None
        self.r: E = None
        self.s: G = None
        self.v: C = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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