class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: I = None
        self.p: D = None
        self.z: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: C = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: F = None
        self.q: G = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: D = None
        self.x: I = None
        self.o: I = None
        self.w: B = None
        self.u: E = None
        self.v: D = None
        self.q: C = None
        self.r: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: D = None
        self.y: B = None
        self.v: C = None
        self.r: E = None
        self.s: F = None
        self.u: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: C = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: F = None
        self.q: G = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: D = None
        self.x: I = None
        self.o: I = None
        self.w: B = None
        self.u: E = None
        self.v: D = None
        self.q: C = None
        self.r: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: D = None
        self.y: B = None
        self.v: C = None
        self.r: E = None
        self.s: F = None
        self.u: B = None
        self.txt = txt

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

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