class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: E = None
        self.x: C = None
        self.w: A = None
        self.z: G = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.r: F = None
        self.z: A = None
        self.w: C = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.q: D = None
        self.r: G = None
        self.x: A = None
        self.p: A = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: C = None
        self.z: E = None
        self.t: B = None
        self.u: E = None
        self.w: H = None
        self.q: D = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: E = None
        self.y: H = None
        self.q: C = None
        self.v: A = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: A = None
        self.q: A = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.r: F = None
        self.z: A = None
        self.w: C = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.q: D = None
        self.r: G = None
        self.x: A = None
        self.p: A = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: C = None
        self.z: E = None
        self.t: B = None
        self.u: E = None
        self.w: H = None
        self.q: D = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: E = None
        self.y: H = None
        self.q: C = None
        self.v: A = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: A = None
        self.q: A = None
        self.u: B = None
        self.txt = txt

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

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