class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: B = None
        self.o: B = None
        self.y: D = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: D = None
        self.r: E = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: C = None
        self.r: G = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: H = None
        self.t: D = None
        self.v: D = None
        self.w: A = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: C = None
        self.o: G = None
        self.t: E = None
        self.p: G = None
        self.z: C = None
        self.v: G = None
        self.u: A = None
        self.txt = txt

g = A("g")
k = B("k")
m = C("m")
n = D("n")
b = E("b")
l = F("l")
i = G("i")
c = H("c")
a = G("a")
h = B("h")

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: D = None
        self.r: E = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: C = None
        self.r: G = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: H = None
        self.t: D = None
        self.v: D = None
        self.w: A = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: C = None
        self.o: G = None
        self.t: E = None
        self.p: G = None
        self.z: C = None
        self.v: G = None
        self.u: A = None
        self.txt = txt

g = A("g")
k = B("k")
m = C("m")
n = D("n")
b = E("b")
l = F("l")
i = G("i")
c = H("c")
a = G("a")
h = B("h")

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