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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: E = None
        self.s: C = None
        self.u: E = None
        self.w: C = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: G = None
        self.v: E = None
        self.o: D = None
        self.q: E = None
        self.s: A = None
        self.w: I = None
        self.x: H = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: I = None
        self.s: B = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: D = None
        self.p: G = None
        self.y: J = None
        self.z: J = None
        self.u: I = None
        self.r: D = None
        self.q: C = None
        self.s: D = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: B = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: D = None
        self.q: C = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: G = None
        self.z: G = None
        self.x: C = None
        self.p: C = None
        self.y: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: E = None
        self.s: C = None
        self.u: E = None
        self.w: C = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: G = None
        self.v: E = None
        self.o: D = None
        self.q: E = None
        self.s: A = None
        self.w: I = None
        self.x: H = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: I = None
        self.s: B = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: D = None
        self.p: G = None
        self.y: J = None
        self.z: J = None
        self.u: I = None
        self.r: D = None
        self.q: C = None
        self.s: D = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: B = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: D = None
        self.q: C = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: G = None
        self.z: G = None
        self.x: C = None
        self.p: C = None
        self.y: G = None
        self.txt = txt

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

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

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