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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: F = None
        self.z: A = None
        self.q: A = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: H = None
        self.v: H = None
        self.s: I = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: B = None
        self.p: I = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: A = None
        self.y: G = None
        self.o: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: F = None
        self.z: A = None
        self.q: A = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: H = None
        self.v: H = None
        self.s: I = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: B = None
        self.p: I = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: A = None
        self.y: G = None
        self.o: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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