class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: H = None
        self.v: I = None
        self.o: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.p: A = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: D = None
        self.x: F = None
        self.u: F = None
        self.q: G = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: E = None
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: A = None
        self.s: F = None
        self.p: F = None
        self.q: F = None
        self.x: A = None
        self.r: F = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.p: A = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: D = None
        self.x: F = None
        self.u: F = None
        self.q: G = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: E = None
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: A = None
        self.s: F = None
        self.p: F = None
        self.q: F = None
        self.x: A = None
        self.r: F = None
        self.v: D = None
        self.txt = txt

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

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