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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: J = None
        self.z: C = None
        self.v: E = None
        self.p: E = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: C = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: G = None
        self.w: I = None
        self.v: H = None
        self.t: D = None
        self.x: G = None
        self.p: H = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: C = None
        self.p: J = None
        self.w: D = None
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: C = None
        self.r: G = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: A = None
        self.t: B = None
        self.v: H = None
        self.s: I = None
        self.y: G = None
        self.r: A = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: J = None
        self.z: C = None
        self.v: E = None
        self.p: E = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: C = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: G = None
        self.w: I = None
        self.v: H = None
        self.t: D = None
        self.x: G = None
        self.p: H = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: C = None
        self.p: J = None
        self.w: D = None
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: C = None
        self.r: G = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: A = None
        self.t: B = None
        self.v: H = None
        self.s: I = None
        self.y: G = None
        self.r: A = None
        self.o: F = None
        self.txt = txt

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

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