class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: E = None
        self.y: G = None
        self.s: I = None
        self.t: G = None
        self.r: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: A = None
        self.x: B = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: B = None
        self.o: F = None
        self.q: B = None
        self.x: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: D = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: E = None
        self.x: B = None
        self.u: A = None
        self.p: A = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: J = None
        self.x: E = None
        self.y: C = None
        self.o: J = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: A = None
        self.x: B = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: B = None
        self.o: F = None
        self.q: B = None
        self.x: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: D = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: E = None
        self.x: B = None
        self.u: A = None
        self.p: A = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: J = None
        self.x: E = None
        self.y: C = None
        self.o: J = None
        self.u: H = None
        self.txt = txt

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

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

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