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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: I = None
        self.u: D = None
        self.t: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: C = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: I = None
        self.u: D = None
        self.t: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: C = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: A = None
        self.txt = txt

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

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