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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: F = None
        self.s: D = None
        self.v: C = None
        self.o: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: C = None
        self.x: C = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: F = None
        self.s: D = None
        self.v: C = None
        self.o: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: C = None
        self.x: C = None
        self.o: H = None
        self.txt = txt

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

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

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

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