class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: B = None
        self.w: F = None
        self.z: C = None
        self.u: I = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: D = None
        self.p: I = None
        self.z: D = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: E = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: B = None
        self.z: I = None
        self.q: F = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: D = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: D = None
        self.p: I = None
        self.z: D = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: E = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: B = None
        self.z: I = None
        self.q: F = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: D = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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