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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: F = None
        self.t: A = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: I = None
        self.u: A = None
        self.z: E = None
        self.x: F = None
        self.q: E = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: G = None
        self.r: B = None
        self.p: H = None
        self.z: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: I = None
        self.o: C = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: F = None
        self.o: C = None
        self.q: D = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: G = None
        self.y: C = None
        self.t: F = None
        self.x: F = None
        self.w: D = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: F = None
        self.t: A = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: I = None
        self.u: A = None
        self.z: E = None
        self.x: F = None
        self.q: E = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: G = None
        self.r: B = None
        self.p: H = None
        self.z: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: I = None
        self.o: C = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: F = None
        self.o: C = None
        self.q: D = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: G = None
        self.y: C = None
        self.t: F = None
        self.x: F = None
        self.w: D = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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