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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: I = None
        self.p: B = None
        self.r: F = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: G = None
        self.q: D = None
        self.r: A = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: G = None
        self.y: G = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: I = None
        self.p: B = None
        self.r: F = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: G = None
        self.q: D = None
        self.r: A = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: G = None
        self.y: G = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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