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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.t: G = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: I = None
        self.t: F = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: A = None
        self.z: H = None
        self.r: D = None
        self.y: C = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: B = None
        self.q: A = None
        self.r: E = None
        self.o: C = None
        self.u: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.t: G = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: I = None
        self.t: F = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: A = None
        self.z: H = None
        self.r: D = None
        self.y: C = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: B = None
        self.q: A = None
        self.r: E = None
        self.o: C = None
        self.u: H = None
        self.txt = txt

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

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

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

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