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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: A = None
        self.s: E = None
        self.t: H = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: I = None
        self.o: F = None
        self.u: D = None
        self.q: C = None
        self.p: F = None
        self.z: F = None
        self.t: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: I = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: A = None
        self.r: F = None
        self.o: C = None
        self.t: A = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: A = None
        self.s: E = None
        self.t: H = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: I = None
        self.o: F = None
        self.u: D = None
        self.q: C = None
        self.p: F = None
        self.z: F = None
        self.t: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: I = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: A = None
        self.r: F = None
        self.o: C = None
        self.t: A = None
        self.y: C = None
        self.txt = txt

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

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