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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: D = None
        self.t: B = None
        self.w: C = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: F = None
        self.z: A = None
        self.s: A = None
        self.v: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: D = None
        self.s: F = None
        self.v: F = None
        self.z: A = None
        self.u: D = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: D = None
        self.t: B = None
        self.w: C = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: F = None
        self.z: A = None
        self.s: A = None
        self.v: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: D = None
        self.s: F = None
        self.v: F = None
        self.z: A = None
        self.u: D = None
        self.p: E = None
        self.txt = txt

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

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