class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: A = None
        self.r: H = None
        self.q: A = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: C = None
        self.r: C = None
        self.s: I = None
        self.q: H = None
        self.y: B = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: H = None
        self.z: E = None
        self.y: C = None
        self.r: C = None
        self.w: A = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: C = None
        self.txt = txt

h = A("h")
l = B("l")
b = C("b")
c = D("c")
e = E("e")
n = F("n")
m = G("m")
k = H("k")
j = I("j")

h.t = c
h.x = b
l.v = c
l.p = c
l.y = h
l.q = h
l.r = k
b.q = m
c.x = m
c.p = n
c.o = b
e.p = j
e.s = j
e.v = b
e.r = b
e.t = b
e.q = k
e.y = l
n.u = j
n.r = e
m.q = b
m.y = b
m.r = b
m.u = b
m.o = k
m.z = e
m.w = h
k.p = j
k.r = j
k.x = j
k.z = e
k.s = n
k.u = l
k.t = c
k.q = c
j.x = c
j.y = b
assert m.o.t.p.u.y.q.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: A = None
        self.r: H = None
        self.q: A = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: C = None
        self.r: C = None
        self.s: I = None
        self.q: H = None
        self.y: B = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: H = None
        self.z: E = None
        self.y: C = None
        self.r: C = None
        self.w: A = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: C = None
        self.txt = txt

h = A("h")
l = B("l")
b = C("b")
c = D("c")
e = E("e")
n = F("n")
m = G("m")
k = H("k")
j = I("j")

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