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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: G = None
        self.y: I = None
        self.s: F = None
        self.v: A = None
        self.z: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: I = None
        self.t: C = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: G = None
        self.y: I = None
        self.s: F = None
        self.v: A = None
        self.z: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: I = None
        self.t: C = None
        self.p: F = None
        self.txt = txt

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

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

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

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