class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: F = None
        self.y: H = None
        self.z: H = None
        self.x: E = None
        self.w: G = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: H = None
        self.u: H = None
        self.t: F = None
        self.q: B = None
        self.v: B = None
        self.s: D = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: D = None
        self.q: E = None
        self.o: A = None
        self.txt = txt

i = A("i")
g = B("g")
m = C("m")
b = D("b")
c = E("c")
f = F("f")
l = G("l")
j = H("j")

i.p = l
i.w = l
i.v = f
i.y = j
i.z = j
i.t = j
i.x = c
g.p = f
g.w = i
g.s = c
g.x = b
g.o = l
m.r = i
m.u = f
m.o = c
m.x = l
b.q = j
b.o = i
b.z = i
b.x = f
b.s = f
b.y = l
c.q = b
c.o = f
f.o = c
f.z = g
f.q = b
f.s = m
f.v = m
f.r = i
f.t = i
f.u = i
l.o = i
l.x = j
l.u = j
l.t = f
l.q = g
l.v = g
l.s = b
l.r = m
j.t = b
j.r = b
j.q = c
j.o = i
assert m.o.q.s.o.q.txt == "
class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: F = None
        self.y: H = None
        self.z: H = None
        self.x: E = None
        self.w: G = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: H = None
        self.u: H = None
        self.t: F = None
        self.q: B = None
        self.v: B = None
        self.s: D = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: D = None
        self.q: E = None
        self.o: A = None
        self.txt = txt

i = A("i")
g = B("g")
m = C("m")
b = D("b")
c = E("c")
f = F("f")
l = G("l")
j = H("j")

i.p = l
i.w = l
i.v = f
i.y = j
i.z = j
i.t = j
i.x = c
g.p = f
g.w = i
g.s = c
g.x = b
g.o = l
m.r = i
m.u = f
m.o = c
m.x = l
b.q = j
b.o = i
b.z = i
b.x = f
b.s = f
b.y = l
c.q = b
c.o = f
f.o = c
f.z = g
f.q = b
f.s = m
f.v = m
f.r = i
f.t = i
f.u = i
l.o = i
l.x = j
l.u = j
l.t = f
l.q = g
l.v = g
l.s = b
l.r = m
j.t = b
j.r = b
j.q = c
j.o = i
assert m.o.q.s.o.q.txt == "b"