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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: G = None
        self.v: I = None
        self.q: I = None
        self.s: G = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: B = None
        self.p: F = None
        self.q: C = None
        self.o: E = None
        self.u: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: A = None
        self.t: E = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: E = None
        self.z: B = None
        self.txt = txt

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

h = A("h")
c = B("c")
e = C("e")
l = D("l")
b = E("b")
i = F("i")
f = G("f")
a = H("a")
d = I("d")

h.t = b
h.w = c
h.u = a
h.q = a
h.x = f
h.y = i
c.p = h
c.s = h
e.o = c
e.u = f
e.s = f
e.v = d
e.q = d
e.w = b
l.x = c
l.r = c
l.p = i
l.q = e
l.o = b
l.u = d
b.o = i
i.u = b
i.t = b
i.v = h
i.x = a
f.u = e
a.r = e
a.o = b
a.z = c
d.u = f
d.p = f
d.o = b
d.x = e
assert f.u.q.x.w.o.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: B = None
        self.u: H = None
        self.q: H = None
        self.x: G = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: G = None
        self.v: I = None
        self.q: I = None
        self.s: G = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: B = None
        self.p: F = None
        self.q: C = None
        self.o: E = None
        self.u: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: A = None
        self.t: E = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: E = None
        self.z: B = None
        self.txt = txt

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

h = A("h")
c = B("c")
e = C("e")
l = D("l")
b = E("b")
i = F("i")
f = G("f")
a = H("a")
d = I("d")

h.t = b
h.w = c
h.u = a
h.q = a
h.x = f
h.y = i
c.p = h
c.s = h
e.o = c
e.u = f
e.s = f
e.v = d
e.q = d
e.w = b
l.x = c
l.r = c
l.p = i
l.q = e
l.o = b
l.u = d
b.o = i
i.u = b
i.t = b
i.v = h
i.x = a
f.u = e
a.r = e
a.o = b
a.z = c
d.u = f
d.p = f
d.o = b
d.x = e
assert f.u.q.x.w.o.t.o.txt == "i"