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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: E = None
        self.t: D = None
        self.z: C = None
        self.y: C = None
        self.s: C = None
        self.x: G = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: B = None
        self.v: G = None
        self.o: D = None
        self.q: G = None
        self.z: H = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: A = None
        self.s: E = None
        self.u: E = None
        self.t: C = None
        self.p: B = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: D = None
        self.txt = txt

c = A("c")
d = B("d")
h = C("h")
a = D("a")
l = E("l")
f = F("f")
j = G("j")
b = H("b")
n = H("n")

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: E = None
        self.t: D = None
        self.z: C = None
        self.y: C = None
        self.s: C = None
        self.x: G = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: B = None
        self.v: G = None
        self.o: D = None
        self.q: G = None
        self.z: H = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: A = None
        self.s: E = None
        self.u: E = None
        self.t: C = None
        self.p: B = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: D = None
        self.txt = txt

c = A("c")
d = B("d")
h = C("h")
a = D("a")
l = E("l")
f = F("f")
j = G("j")
b = H("b")
n = H("n")

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