class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: I = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: A = None
        self.y: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: J = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: F = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: A = None
        self.y: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: J = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: F = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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