class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: B = None
        self.t: E = None
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: G = None
        self.y: G = None
        self.v: F = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: H = None
        self.w: H = None
        self.u: E = None
        self.t: E = None
        self.y: B = None
        self.r: B = None
        self.o: I = None
        self.v: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: C = None
        self.o: D = None
        self.w: D = None
        self.s: G = None
        self.u: B = None
        self.y: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: G = None
        self.y: G = None
        self.v: F = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: H = None
        self.w: H = None
        self.u: E = None
        self.t: E = None
        self.y: B = None
        self.r: B = None
        self.o: I = None
        self.v: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: C = None
        self.o: D = None
        self.w: D = None
        self.s: G = None
        self.u: B = None
        self.y: E = None
        self.txt = txt

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

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