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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: B = None
        self.x: B = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: F = None
        self.z: G = None
        self.p: G = None
        self.x: I = None
        self.u: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: B = None
        self.x: B = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: F = None
        self.z: G = None
        self.p: G = None
        self.x: I = None
        self.u: I = None
        self.txt = txt

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

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

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