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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: D = None
        self.y: C = None
        self.q: F = None
        self.v: B = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: G = None
        self.y: D = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: A = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: F = None
        self.s: A = None
        self.p: B = None
        self.t: B = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: D = None
        self.y: C = None
        self.q: F = None
        self.v: B = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: G = None
        self.y: D = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: A = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: F = None
        self.s: A = None
        self.p: B = None
        self.t: B = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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