class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: A = None
        self.s: E = None
        self.r: H = None
        self.o: H = None
        self.y: F = None
        self.q: F = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: A = None
        self.t: B = None
        self.o: F = None
        self.r: F = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: F = None
        self.w: F = None
        self.t: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: G = None
        self.u: C = None
        self.r: G = None
        self.t: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: F = None
        self.z: F = None
        self.y: F = None
        self.v: F = None
        self.q: A = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: A = None
        self.s: E = None
        self.r: H = None
        self.o: H = None
        self.y: F = None
        self.q: F = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: A = None
        self.t: B = None
        self.o: F = None
        self.r: F = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: F = None
        self.w: F = None
        self.t: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: G = None
        self.u: C = None
        self.r: G = None
        self.t: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: F = None
        self.z: F = None
        self.y: F = None
        self.v: F = None
        self.q: A = None
        self.r: D = None
        self.txt = txt

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

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