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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: E = None
        self.s: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: E = None
        self.s: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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