class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: D = None
        self.q: A = None
        self.z: D = None
        self.t: E = None
        self.u: A = None
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: G = None
        self.o: B = None
        self.t: F = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

i = A("i")
n = B("n")
b = C("b")
g = D("g")
h = E("h")
e = F("e")
f = G("f")
c = E("c")
l = A("l")
a = F("a")

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: G = None
        self.o: B = None
        self.t: F = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

i = A("i")
n = B("n")
b = C("b")
g = D("g")
h = E("h")
e = F("e")
f = G("f")
c = E("c")
l = A("l")
a = F("a")

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