class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: C = None
        self.w: F = None
        self.s: E = None
        self.p: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: D = None
        self.v: D = None
        self.s: G = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: H = None
        self.r: C = None
        self.v: G = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

g = A("g")
b = B("b")
k = C("k")
c = D("c")
a = E("a")
f = F("f")
h = G("h")
m = H("m")
d = I("d")
i = J("i")

g.q = h
g.u = k
g.w = f
g.s = a
g.p = m
b.y = i
k.z = b
k.w = c
k.v = c
k.s = h
k.r = a
c.x = f
c.p = m
c.r = k
c.v = h
c.z = d
a.z = m
a.v = c
a.y = c
a.q = h
a.p = k
a.u = k
a.x = f
a.r = g
a.t = b
f.y = a
f.r = b
h.r = b
h.y = b
m.q = k
d.u = g
d.q = a
d.y = c
i.x = f
assert i.x.y.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: C = None
        self.w: F = None
        self.s: E = None
        self.p: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: D = None
        self.v: D = None
        self.s: G = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: H = None
        self.r: C = None
        self.v: G = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

g = A("g")
b = B("b")
k = C("k")
c = D("c")
a = E("a")
f = F("f")
h = G("h")
m = H("m")
d = I("d")
i = J("i")

g.q = h
g.u = k
g.w = f
g.s = a
g.p = m
b.y = i
k.z = b
k.w = c
k.v = c
k.s = h
k.r = a
c.x = f
c.p = m
c.r = k
c.v = h
c.z = d
a.z = m
a.v = c
a.y = c
a.q = h
a.p = k
a.u = k
a.x = f
a.r = g
a.t = b
f.y = a
f.r = b
h.r = b
h.y = b
m.q = k
d.u = g
d.q = a
d.y = c
i.x = f
assert i.x.y.t.y.txt == "i"