class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: H = None
        self.w: C = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: H = None
        self.t: F = None
        self.v: A = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: G = None
        self.s: J = None
        self.y: E = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: J = None
        self.u: J = None
        self.v: C = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: F = None
        self.z: D = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: D = None
        self.u: D = None
        self.q: I = None
        self.s: F = None
        self.txt = txt

b = A("b")
h = B("h")
c = C("c")
n = D("n")
k = E("k")
f = F("f")
a = G("a")
e = H("e")
d = I("d")
g = J("g")

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: H = None
        self.t: F = None
        self.v: A = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: G = None
        self.s: J = None
        self.y: E = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: J = None
        self.u: J = None
        self.v: C = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: F = None
        self.z: D = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: D = None
        self.u: D = None
        self.q: I = None
        self.s: F = None
        self.txt = txt

b = A("b")
h = B("h")
c = C("c")
n = D("n")
k = E("k")
f = F("f")
a = G("a")
e = H("e")
d = I("d")
g = J("g")

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