class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: E = None
        self.z: E = None
        self.u: E = None
        self.o: E = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: A = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: H = None
        self.r: I = None
        self.s: B = None
        self.p: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: D = None
        self.p: H = None
        self.u: H = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: A = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: H = None
        self.r: I = None
        self.s: B = None
        self.p: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: D = None
        self.p: H = None
        self.u: H = None
        self.s: A = None
        self.txt = txt

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

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