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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: E = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

h = A("h")
m = B("m")
n = C("n")
c = D("c")
l = E("l")
g = F("g")
a = G("a")
i = H("i")

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: E = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

h = A("h")
m = B("m")
n = C("n")
c = D("c")
l = E("l")
g = F("g")
a = G("a")
i = H("i")

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