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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: A = None
        self.x: D = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: H = None
        self.q: D = None
        self.x: H = None
        self.p: B = None
        self.v: F = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: I = None
        self.s: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: F = None
        self.p: A = None
        self.q: B = None
        self.x: B = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: A = None
        self.x: D = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: H = None
        self.q: D = None
        self.x: H = None
        self.p: B = None
        self.v: F = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: I = None
        self.s: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: F = None
        self.p: A = None
        self.q: B = None
        self.x: B = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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