class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: F = None
        self.y: F = None
        self.s: E = None
        self.r: H = None
        self.q: F = None
        self.u: E = None
        self.v: H = None
        self.z: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: C = None
        self.z: A = None
        self.p: A = None
        self.y: F = None
        self.r: B = None
        self.v: H = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: F = None
        self.t: B = None
        self.v: D = None
        self.o: G = None
        self.r: D = None
        self.u: A = None
        self.x: A = None
        self.txt = txt

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

m = A("m")
j = B("j")
b = C("b")
f = D("f")
g = E("g")
k = F("k")
e = G("e")
d = H("d")
i = I("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: C = None
        self.z: A = None
        self.p: A = None
        self.y: F = None
        self.r: B = None
        self.v: H = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: F = None
        self.t: B = None
        self.v: D = None
        self.o: G = None
        self.r: D = None
        self.u: A = None
        self.x: A = None
        self.txt = txt

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

m = A("m")
j = B("j")
b = C("b")
f = D("f")
g = E("g")
k = F("k")
e = G("e")
d = H("d")
i = I("i")

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