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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: B = None
        self.w: H = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: B = None
        self.w: H = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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