class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: I = None
        self.t: D = None
        self.q: D = None
        self.u: E = None
        self.o: F = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: F = None
        self.p: E = None
        self.z: I = None
        self.q: E = None
        self.o: B = None
        self.s: J = None
        self.x: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: C = None
        self.o: A = None
        self.w: D = None
        self.s: D = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: C = None
        self.t: F = None
        self.r: C = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: B = None
        self.z: G = None
        self.t: D = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: F = None
        self.p: E = None
        self.z: I = None
        self.q: E = None
        self.o: B = None
        self.s: J = None
        self.x: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: C = None
        self.o: A = None
        self.w: D = None
        self.s: D = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: C = None
        self.t: F = None
        self.r: C = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: B = None
        self.z: G = None
        self.t: D = None
        self.x: F = None
        self.txt = txt

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

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