class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: G = None
        self.u: D = None
        self.w: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: C = None
        self.r: C = None
        self.p: C = None
        self.x: C = None
        self.q: G = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: C = None
        self.r: C = None
        self.p: C = None
        self.x: C = None
        self.q: G = None
        self.t: C = None
        self.txt = txt

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

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