class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: E = None
        self.t: C = None
        self.z: H = None
        self.s: B = None
        self.w: C = None
        self.v: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: J = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: J = None
        self.o: A = None
        self.p: G = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.s: I = None
        self.y: E = None
        self.z: A = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: C = None
        self.s: G = None
        self.u: J = None
        self.w: B = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: J = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: J = None
        self.o: A = None
        self.p: G = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.s: I = None
        self.y: E = None
        self.z: A = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: C = None
        self.s: G = None
        self.u: J = None
        self.w: B = None
        self.o: E = None
        self.txt = txt

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

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

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