class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: G = None
        self.x: B = None
        self.v: F = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: H = None
        self.w: E = None
        self.y: J = None
        self.q: B = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: I = None
        self.o: D = None
        self.t: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: G = None
        self.x: B = None
        self.v: F = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: H = None
        self.w: E = None
        self.y: J = None
        self.q: B = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: I = None
        self.o: D = None
        self.t: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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