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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: J = None
        self.s: H = None
        self.x: A = None
        self.z: J = None
        self.v: I = None
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: B = None
        self.u: I = None
        self.q: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: F = None
        self.w: J = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: B = None
        self.t: G = None
        self.y: D = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: I = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: E = None
        self.o: G = None
        self.r: G = None
        self.w: C = None
        self.y: B = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: H = None
        self.s: G = None
        self.u: G = None
        self.z: I = None
        self.o: I = None
        self.y: H = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: J = None
        self.s: H = None
        self.x: A = None
        self.z: J = None
        self.v: I = None
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: B = None
        self.u: I = None
        self.q: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: F = None
        self.w: J = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: B = None
        self.t: G = None
        self.y: D = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: I = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: E = None
        self.o: G = None
        self.r: G = None
        self.w: C = None
        self.y: B = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: H = None
        self.s: G = None
        self.u: G = None
        self.z: I = None
        self.o: I = None
        self.y: H = None
        self.v: F = None
        self.txt = txt

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

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