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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: D = None
        self.z: F = None
        self.v: G = None
        self.p: A = None
        self.x: E = None
        self.s: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

c = A("c")
n = B("n")
j = C("j")
a = D("a")
e = E("e")
h = F("h")
f = G("f")
d = H("d")
i = I("i")
m = E("m")

c.p = f
c.y = i
c.s = j
c.t = j
c.x = j
c.u = d
c.v = d
c.r = n
c.o = e
n.u = c
n.p = c
n.t = a
n.z = h
n.v = f
n.x = e
n.s = i
j.q = f
j.p = d
a.r = n
a.o = d
e.o = d
h.r = a
f.u = c
f.x = d
f.s = n
f.o = n
f.p = n
f.q = e
f.y = j
f.t = h
d.x = h
d.o = a
d.w = e
d.r = i
i.q = e
i.w = j
i.s = j
i.v = j
i.p = h
i.o = m
i.u = n
i.z = a
m.o = d
assert a.r.v.u.v.o.o.x.r.txt == "
class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: I = None
        self.s: C = None
        self.t: C = None
        self.u: H = None
        self.r: B = None
        self.x: C = None
        self.v: H = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: D = None
        self.z: F = None
        self.v: G = None
        self.p: A = None
        self.x: E = None
        self.s: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

c = A("c")
n = B("n")
j = C("j")
a = D("a")
e = E("e")
h = F("h")
f = G("f")
d = H("d")
i = I("i")
m = E("m")

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