class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: H = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: G = None
        self.q: C = None
        self.y: G = None
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: F = None
        self.y: F = None
        self.p: H = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: C = None
        self.t: I = None
        self.v: C = None
        self.y: I = None
        self.u: B = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: E = None
        self.p: I = None
        self.x: A = None
        self.w: C = None
        self.v: D = None
        self.s: F = None
        self.u: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: G = None
        self.q: C = None
        self.y: G = None
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: F = None
        self.y: F = None
        self.p: H = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: C = None
        self.t: I = None
        self.v: C = None
        self.y: I = None
        self.u: B = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: E = None
        self.p: I = None
        self.x: A = None
        self.w: C = None
        self.v: D = None
        self.s: F = None
        self.u: F = None
        self.txt = txt

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

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

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