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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: F = None
        self.v: G = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: B = None
        self.s: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: E = None
        self.x: D = None
        self.o: F = None
        self.r: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: F = None
        self.v: G = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: B = None
        self.s: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: E = None
        self.x: D = None
        self.o: F = None
        self.r: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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