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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: D = None
        self.w: E = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: B = None
        self.x: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: E = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: F = None
        self.p: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: D = None
        self.w: E = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: B = None
        self.x: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: E = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: F = None
        self.p: H = None
        self.txt = txt

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

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