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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.s: A = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: B = None
        self.x: G = None
        self.y: E = None
        self.t: D = None
        self.r: G = None
        self.txt = txt

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

g = A("g")
j = B("j")
n = C("n")
a = D("a")
m = E("m")
i = F("i")
d = G("d")
e = G("e")
f = D("f")

g.y = n
j.u = m
j.y = m
j.r = m
j.s = g
n.p = a
a.w = f
a.r = f
a.o = n
a.v = g
a.z = i
a.y = i
a.t = m
m.s = g
m.z = n
m.x = n
m.y = j
i.s = m
i.y = m
i.o = j
i.x = d
i.r = d
i.t = f
d.z = j
d.w = j
d.p = a
d.v = n
d.y = i
e.z = j
e.w = j
e.p = f
e.v = n
e.y = i
f.w = a
f.r = a
f.o = n
f.v = g
f.z = i
f.y = i
f.t = m
assert f.v.y.p.y.r.v.p.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.s: A = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: B = None
        self.x: G = None
        self.y: E = None
        self.t: D = None
        self.r: G = None
        self.txt = txt

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

g = A("g")
j = B("j")
n = C("n")
a = D("a")
m = E("m")
i = F("i")
d = G("d")
e = G("e")
f = D("f")

g.y = n
j.u = m
j.y = m
j.r = m
j.s = g
n.p = a
a.w = f
a.r = f
a.o = n
a.v = g
a.z = i
a.y = i
a.t = m
m.s = g
m.z = n
m.x = n
m.y = j
i.s = m
i.y = m
i.o = j
i.x = d
i.r = d
i.t = f
d.z = j
d.w = j
d.p = a
d.v = n
d.y = i
e.z = j
e.w = j
e.p = f
e.v = n
e.y = i
f.w = a
f.r = a
f.o = n
f.v = g
f.z = i
f.y = i
f.t = m
assert f.v.y.p.y.r.v.p.txt == "a"