class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: B = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: B = None
        self.r: J = None
        self.y: D = None
        self.w: E = None
        self.t: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: A = None
        self.s: J = None
        self.o: G = None
        self.p: I = None
        self.y: A = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: F = None
        self.x: C = None
        self.w: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: G = None
        self.o: H = None
        self.t: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: B = None
        self.r: J = None
        self.y: D = None
        self.w: E = None
        self.t: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: A = None
        self.s: J = None
        self.o: G = None
        self.p: I = None
        self.y: A = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: F = None
        self.x: C = None
        self.w: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: G = None
        self.o: H = None
        self.t: B = None
        self.txt = txt

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

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

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