class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: I = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: D = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: D = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

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