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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: G = None
        self.u: I = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: E = None
        self.r: G = None
        self.u: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: A = None
        self.w: H = None
        self.q: B = None
        self.y: B = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: B = None
        self.p: B = None
        self.u: G = None
        self.y: I = None
        self.x: B = None
        self.txt = txt

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

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

l.z = m
l.q = m
l.u = i
l.v = k
f.q = k
f.y = m
f.u = h
f.x = l
k.y = h
k.s = f
k.v = f
k.q = f
k.w = j
k.r = j
a.p = h
a.s = i
a.r = m
a.u = m
i.s = m
e.x = j
e.w = j
e.r = l
e.q = f
e.y = f
e.u = a
m.v = f
m.r = k
m.q = h
m.y = e
m.z = l
m.o = j
j.t = e
j.s = f
j.p = f
j.x = f
j.u = m
j.y = h
h.t = j
h.w = k
assert h.w.y.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: G = None
        self.u: E = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: G = None
        self.u: I = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: E = None
        self.r: G = None
        self.u: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: A = None
        self.w: H = None
        self.q: B = None
        self.y: B = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: B = None
        self.p: B = None
        self.u: G = None
        self.y: I = None
        self.x: B = None
        self.txt = txt

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

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

l.z = m
l.q = m
l.u = i
l.v = k
f.q = k
f.y = m
f.u = h
f.x = l
k.y = h
k.s = f
k.v = f
k.q = f
k.w = j
k.r = j
a.p = h
a.s = i
a.r = m
a.u = m
i.s = m
e.x = j
e.w = j
e.r = l
e.q = f
e.y = f
e.u = a
m.v = f
m.r = k
m.q = h
m.y = e
m.z = l
m.o = j
j.t = e
j.s = f
j.p = f
j.x = f
j.u = m
j.y = h
h.t = j
h.w = k
assert h.w.y.w.y.txt == "h"