class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: F = None
        self.u: E = None
        self.v: E = None
        self.x: G = None
        self.r: A = None
        self.q: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: G = None
        self.s: D = None
        self.p: F = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: A = None
        self.t: B = None
        self.p: G = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: F = None
        self.u: C = None
        self.x: A = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: D = None
        self.s: D = None
        self.o: E = None
        self.q: C = None
        self.txt = txt

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

c = A("c")
m = B("m")
h = C("h")
k = D("k")
l = E("l")
n = F("n")
i = G("i")
g = G("g")
a = A("a")
j = A("j")

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: G = None
        self.s: D = None
        self.p: F = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: A = None
        self.t: B = None
        self.p: G = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: F = None
        self.u: C = None
        self.x: A = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: D = None
        self.s: D = None
        self.o: E = None
        self.q: C = None
        self.txt = txt

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

c = A("c")
m = B("m")
h = C("h")
k = D("k")
l = E("l")
n = F("n")
i = G("i")
g = G("g")
a = A("a")
j = A("j")

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