class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: G = None
        self.v: C = None
        self.s: E = None
        self.q: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: A = None
        self.t: A = None
        self.q: G = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.v: H = None
        self.r: C = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: A = None
        self.t: A = None
        self.q: G = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.v: H = None
        self.r: C = None
        self.x: A = None
        self.txt = txt

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

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

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

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