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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: H = None
        self.r: B = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: G = None
        self.p: F = None
        self.r: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: I = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: C = None
        self.y: B = None
        self.o: C = None
        self.v: C = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: H = None
        self.u: B = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.p: G = None
        self.q: A = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: A = None
        self.u: C = None
        self.p: A = None
        self.s: B = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: H = None
        self.r: B = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: G = None
        self.p: F = None
        self.r: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: I = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: C = None
        self.y: B = None
        self.o: C = None
        self.v: C = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: H = None
        self.u: B = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.p: G = None
        self.q: A = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: A = None
        self.u: C = None
        self.p: A = None
        self.s: B = None
        self.v: A = None
        self.txt = txt

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

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