class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: I = None
        self.o: H = None
        self.u: H = None
        self.w: E = None
        self.s: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: F = None
        self.p: H = None
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: F = None
        self.z: C = None
        self.t: I = None
        self.q: F = None
        self.s: H = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: F = None
        self.p: H = None
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: F = None
        self.z: C = None
        self.t: I = None
        self.q: F = None
        self.s: H = None
        self.txt = txt

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

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

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

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