class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: C = None
        self.u: C = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: H = None
        self.z: F = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: H = None
        self.z: F = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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