class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: E = None
        self.y: F = None
        self.t: G = None
        self.z: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: F = None
        self.w: G = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.o: I = None
        self.s: D = None
        self.y: D = None
        self.q: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: F = None
        self.u: D = None
        self.y: F = None
        self.p: E = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: F = None
        self.w: G = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.o: I = None
        self.s: D = None
        self.y: D = None
        self.q: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: F = None
        self.u: D = None
        self.y: F = None
        self.p: E = None
        self.w: A = None
        self.txt = txt

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

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