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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: J = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: J = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: D = None
        self.u: G = None
        self.z: G = None
        self.q: G = None
        self.p: D = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: F = None
        self.w: I = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: F = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: F = None
        self.u: D = None
        self.s: C = None
        self.w: C = None
        self.p: A = None
        self.t: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: J = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: J = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: D = None
        self.u: G = None
        self.z: G = None
        self.q: G = None
        self.p: D = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: F = None
        self.w: I = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: F = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: F = None
        self.u: D = None
        self.s: C = None
        self.w: C = None
        self.p: A = None
        self.t: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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