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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: H = None
        self.p: H = None
        self.t: D = None
        self.y: D = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: H = None
        self.p: H = None
        self.t: D = None
        self.y: D = None
        self.w: B = None
        self.txt = txt

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

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

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

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