class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: E = None
        self.v: G = None
        self.w: G = None
        self.s: D = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: F = None
        self.z: C = None
        self.u: H = None
        self.s: G = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: D = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.q: H = None
        self.p: A = None
        self.z: G = None
        self.t: F = None
        self.r: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.y: D = None
        self.q: B = None
        self.r: D = None
        self.v: B = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: B = None
        self.v: D = None
        self.z: D = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: F = None
        self.z: C = None
        self.u: H = None
        self.s: G = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: D = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.q: H = None
        self.p: A = None
        self.z: G = None
        self.t: F = None
        self.r: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.y: D = None
        self.q: B = None
        self.r: D = None
        self.v: B = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: B = None
        self.v: D = None
        self.z: D = None
        self.p: A = None
        self.txt = txt

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

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