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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: H = None
        self.w: H = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: F = None
        self.z: G = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: H = None
        self.w: H = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: F = None
        self.z: G = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

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