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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: C = None
        self.y: I = None
        self.u: A = None
        self.t: E = None
        self.r: I = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: A = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: C = None
        self.t: G = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: D = None
        self.t: C = None
        self.txt = txt

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

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

h = A("h")
c = B("c")
n = C("n")
b = D("b")
f = E("f")
j = F("j")
i = G("i")
e = H("e")
m = I("m")

h.x = b
h.u = f
c.p = m
c.y = m
c.r = m
c.o = n
c.u = h
c.t = f
c.z = f
n.s = f
n.t = e
b.y = h
b.x = h
b.r = h
f.o = b
f.v = n
f.t = i
f.u = j
j.y = i
j.x = n
j.s = f
i.o = j
i.z = b
i.t = n
e.t = i
e.q = i
m.x = e
m.z = e
m.w = j
assert f.u.y.t.s.o.r.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: C = None
        self.y: I = None
        self.u: A = None
        self.t: E = None
        self.r: I = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: A = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: C = None
        self.t: G = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: D = None
        self.t: C = None
        self.txt = txt

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

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

h = A("h")
c = B("c")
n = C("n")
b = D("b")
f = E("f")
j = F("j")
i = G("i")
e = H("e")
m = I("m")

h.x = b
h.u = f
c.p = m
c.y = m
c.r = m
c.o = n
c.u = h
c.t = f
c.z = f
n.s = f
n.t = e
b.y = h
b.x = h
b.r = h
f.o = b
f.v = n
f.t = i
f.u = j
j.y = i
j.x = n
j.s = f
i.o = j
i.z = b
i.t = n
e.t = i
e.q = i
m.x = e
m.z = e
m.w = j
assert f.u.y.t.s.o.r.u.u.txt == "j"