class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: H = None
        self.r: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: F = None
        self.v: D = None
        self.p: E = None
        self.y: H = None
        self.x: H = None
        self.o: F = None
        self.u: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: B = None
        self.v: G = None
        self.y: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: F = None
        self.v: D = None
        self.p: E = None
        self.y: H = None
        self.x: H = None
        self.o: F = None
        self.u: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: B = None
        self.v: G = None
        self.y: B = None
        self.x: C = None
        self.txt = txt

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

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