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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: F = None
        self.u: H = None
        self.y: D = None
        self.q: D = None
        self.s: A = None
        self.v: G = None
        self.z: J = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: H = None
        self.o: B = None
        self.v: E = None
        self.p: A = None
        self.q: C = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: D = None
        self.o: J = None
        self.txt = txt

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

c = A("c")
l = B("l")
m = C("m")
n = D("n")
i = E("i")
g = F("g")
b = G("b")
h = H("h")
e = I("e")
j = J("j")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: F = None
        self.u: H = None
        self.y: D = None
        self.q: D = None
        self.s: A = None
        self.v: G = None
        self.z: J = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: H = None
        self.o: B = None
        self.v: E = None
        self.p: A = None
        self.q: C = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: D = None
        self.o: J = None
        self.txt = txt

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

c = A("c")
l = B("l")
m = C("m")
n = D("n")
i = E("i")
g = F("g")
b = G("b")
h = H("h")
e = I("e")
j = J("j")

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