class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: F = None
        self.x: D = None
        self.y: I = None
        self.q: G = None
        self.o: G = None
        self.t: I = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: E = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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

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

j.u = n
j.q = n
j.o = n
j.p = g
j.x = b
j.y = l
j.t = l
j.v = a
a.p = j
a.z = i
a.o = n
a.s = f
e.z = n
e.p = f
e.y = b
b.t = e
f.w = j
g.x = l
g.o = f
n.u = a
n.q = j
n.w = g
i.v = b
i.z = a
i.t = e
l.u = g
l.x = b
assert j.o.q.x.t.p.w.u.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: F = None
        self.x: D = None
        self.y: I = None
        self.q: G = None
        self.o: G = None
        self.t: I = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: E = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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

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

j.u = n
j.q = n
j.o = n
j.p = g
j.x = b
j.y = l
j.t = l
j.v = a
a.p = j
a.z = i
a.o = n
a.s = f
e.z = n
e.p = f
e.y = b
b.t = e
f.w = j
g.x = l
g.o = f
n.u = a
n.q = j
n.w = g
i.v = b
i.z = a
i.t = e
l.u = g
l.x = b
assert j.o.q.x.t.p.w.u.u.s.txt == "f"