class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: F = None
        self.u: F = None
        self.r: C = None
        self.y: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: G = None
        self.x: G = None
        self.t: A = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: G = None
        self.x: G = None
        self.t: A = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

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

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

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