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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: A = None
        self.s: A = None
        self.t: C = None
        self.u: A = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: B = None
        self.x: E = None
        self.txt = txt

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

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

k = A("k")
e = B("e")
j = C("j")
d = D("d")
l = E("l")
b = F("b")
f = G("f")
i = H("i")
a = A("a")
g = H("g")

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: A = None
        self.s: A = None
        self.t: C = None
        self.u: A = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: B = None
        self.x: E = None
        self.txt = txt

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

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

k = A("k")
e = B("e")
j = C("j")
d = D("d")
l = E("l")
b = F("b")
f = G("f")
i = H("i")
a = A("a")
g = H("g")

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