class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: H = None
        self.y: H = None
        self.s: F = None
        self.t: I = None
        self.x: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: C = None
        self.p: D = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: G = None
        self.z: A = None
        self.u: B = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: I = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: A = None
        self.p: D = None
        self.w: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: C = None
        self.p: D = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: G = None
        self.z: A = None
        self.u: B = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: I = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: A = None
        self.p: D = None
        self.w: C = None
        self.txt = txt

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

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